<template>
  <button @click="showMessage">显示弹窗</button>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import Message from '../packages/message';

export default defineComponent({
  name: 'App',
  setup(){
    
    const showMessage = ()=>{
      Message({
        center:true,
        type:'success'
        })
    }
    return {
      showMessage
    }
  },

  /*
  //兼容vue2用法
  methods:{
    showMessage(this:{$message:()=>void}){
      this.$message()
      // (this as any).$message()
    }
  }
  */
});
</script>

<style lang="scss">

</style>
